package java8_13;

import java.util.Arrays;

/**
 * @author oldliu
 * @since 1.0
 */
public class Arr2 {
    public static void main(String[] args) {
        double d[]=new double[10];
        Arrays.fill(d,4.6);
        //System.out.println(Arrays.toString(d));
        for(double x:d)
            System.out.println(x);
        int []a={1,3,5,6,7,16,8,99,9,100,101,1003,1006};
        int a2[]=Arrays.copyOf(a,40);
        System.out.println(Arrays.toString(a2));
        a=Arrays.copyOf(a,7);
        System.out.println(Arrays.toString(a));
        int []a3={1,2,4,5,7,8,9,11};
        int pos=Arrays.binarySearch(a3,9);
        System.out.println(pos);//位置
    }
}
